<#include "../common/layout.ftl"/>
<@layout>
<div class="well">

	<form id="form1" method="post" action="/company/history?id=${id}" class="form-inline">
		<span class="label label-success">公司充值记录查看</span>
		充值时间：
		<input type="text" class="input-medium" style="height: 26" placeholder="开始时间" name="startTime" value="${startTime!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>到
		<input type="text" class="input-medium" style="height: 26" placeholder="结束时间" name="endTime" value="${endTime!""}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>
		(格式：yyyy-MM-dd,如：2013-05-01)
		<#if session.userRole == 'admin' || session.userRole == 'brandManager'>
			<button type="submit" class="btn btn-primary"><i class="icon-search icon-white"></i>查询</button>
		</#if>
	</form>
  </div>

<div class="well">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
		  	<th>ID</th>
		  	<th>公司名称</th>
		    <th>充值银行</th>
			<th>银行流水号</th>
			<th>充值金额</th>
			<th>充值时间</th>
			<th>充值前余额</th>
			<th>操作人</th>
			<th>备注</th>s
		  </tr>
		</thead>
		<tbody>
		<#list page.list as deposit>
		  <tr>
		  	<td>
			  ${deposit.id!""}
			</td>
			<td>
			  ${deposit.companyname!""}
			</td>
		    <td>
			  ${deposit.bank!""}
			</td>
			<td>
			  ${deposit.serialno!""}
			</td>
			<td>
			  ￥${deposit.money?string(",##0.00")}
			</td>
			<td>
				${deposit.createtime?string("yyyy-MM-dd HH:mm:ss")}
			</td>
			<td>
			  ￥${deposit.before_balance?string(",##0.00")}
			</td>
			<td>
			  	${deposit.username}
			</td>
			<td>
				${deposit.remark!""}
			</td>
		  </tr>
		</#list>
		</tbody>
	</table>  
	<#include "../common/paginate.ftl" />
	<@paginate currentPage=page.pageNumber totalPage=page.totalPage actionUrl="/company/history/" urlParas="?id=${id}&startTime=${startTime!''}&endTime=${endTime!''}" />
</div>
 <script>
function excel() {
  document.getElementById('form1').action= '/recharge/excel';
  document.getElementById('form1').submit();
}
</script>
<script type="text/javascript" src="/js/wdatePicker/WdatePicker.js"></script>
</@layout>